<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>

<link rel="stylesheet" type="text/css" href="css/zTreeStyle/zTreeStyle.css" />
<link rel="stylesheet" type="text/css" href="css/demo.css" />
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="js/jquery.ztree.all.min.js"></script>

<script type="text/javascript">
//节点数据格式一 复杂数据格式
var nodes = [
	{
		name: "父节点1", 
		children: [{name: "子节点1"},{name: "子节点2"}]
	}
];

//配置信息js对象
var setting={}
//网页加载完毕执行这个方法
$(function() {
	//使用配置信息和节点数据初始化树
	$.fn.zTree.init($("#treeDemo"), setting, nodes);
})
</script>
</script>
</head>
<body>
<div >
	<ul id="treeDemo" class="ztree"></ul>
</div>
</body>
</html>